package com.woniuxy02;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class Test03 {

    public static void main(String[] args) throws IOException {
        write();
        read();
    }
    private static void read() throws IOException {
        FileReader fr = new FileReader("a.txt");
        int date;
        while((date=fr.read())!=-1){
            System.out.print((char)date);
        }
    }

    private static void write() throws IOException {
        FileWriter fw = new FileWriter("a.txt");
        fw.write("abc中文");
        fw.flush();
        fw.close();
    }
}
